#include "../inc/mblog_reply_item.h"

mblog_reply_item::mblog_reply_item(QWidget *parent)
    : QWidget(parent)
{
	ui.setupUi(this);
}

mblog_reply_item::~mblog_reply_item()
{

}

void mblog_reply_item::InitMblog(const QDomElement& item){
	QDomElement eleUser= item.firstChildElement("user");
	this->author_guid=eleUser.firstChildElement("guid").text().toInt();
	this->author_id=eleUser.firstChildElement("userid").text();
	this->author_sex=eleUser.firstChildElement("sex").text();
	this->guid=item.firstChildElement("guid").text().toInt();
	this->create_time=item.firstChildElement("time").text();
	this->replynum=item.firstChildElement("replynum").text().toInt();
	this->location=item.firstChildElement("location").text();
	this->content=item.firstChildElement("content").text();
	this->blog_type=item.firstChildElement("blogtype").text();
	this->ui.labContent->setText(this->content);
	this->ui.labLocation->setText(this->location);
	this->ui.labName->setText(this->author_id);
	this->ui.labTime->setText(this->create_time);
}

